package com.ruoyi.course.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.course.mapper.TTalkMapper;
import com.ruoyi.course.domain.TTalk;
import com.ruoyi.course.service.ITTalkService;

/**
 * 讨论Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-30
 */
@Service
public class TTalkServiceImpl implements ITTalkService
{
    @Autowired
    private TTalkMapper tTalkMapper;

    /**
     * 查询讨论
     *
     * @param id 讨论主键
     * @return 讨论
     */
    @Override
    public TTalk selectTTalkById(Long id)
    {
        return tTalkMapper.selectTTalkById(id);
    }

    /**
     * 查询讨论列表
     *
     * @param tTalk 讨论
     * @return 讨论
     */
    @Override
    public List<TTalk> selectTTalkList(TTalk tTalk)
    {
        return tTalkMapper.selectTTalkList(tTalk);
    }

    /**
     * 新增讨论
     *
     * @param tTalk 讨论
     * @return 结果
     */
    @Override
    public int insertTTalk(TTalk tTalk)
    {
        return tTalkMapper.insertTTalk(tTalk);
    }

    /**
     * 修改讨论
     *
     * @param tTalk 讨论
     * @return 结果
     */
    @Override
    public int updateTTalk(TTalk tTalk)
    {
        return tTalkMapper.updateTTalk(tTalk);
    }

    /**
     * 批量删除讨论
     *
     * @param ids 需要删除的讨论主键
     * @return 结果
     */
    @Override
    public int deleteTTalkByIds(Long[] ids)
    {
        return tTalkMapper.deleteTTalkByIds(ids);
    }

    /**
     * 删除讨论信息
     *
     * @param id 讨论主键
     * @return 结果
     */
    @Override
    public int deleteTTalkById(Long id)
    {
        return tTalkMapper.deleteTTalkById(id);
    }
}

